public class Test {
    public static void main(String[] args) {
        Integer a = 100;
        Integer b = 100;
        System.out.println(a == b);//true

        Integer aa = 200;
        Integer bb = 200;
        System.out.println(aa == bb);//false 原因：溢出，重新分配对象
    }

    public static void main2(String[] args) {
        Integer i = 18;
        int a = i;//自动拆箱
        int b = i.intValue();//显式拆箱
        double c = i.doubleValue();

        System.out.println("i:" + i);
        System.out.println("a:" + a);
        System.out.println("b:" + b);
        System.out.println("c:" + c);
    }

    public static void main1(String[] args) {
        int i = 10;
        Integer a = i;//自动装箱

        Integer b = Integer.valueOf(78);//显式装箱
    }
}
